package com.example.xftest.service;

import com.example.xftest.entity.Job;
import com.example.xftest.mapper.JobDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JobServiceImpl implements JobService{
    @Autowired
    JobDao jobDao;
    @Override
    public List<Job> select() {
        return jobDao.selectList(null);
    }
    @Override
    public int add(Job job) {
        return jobDao.insert(job);
    }

    @Override
    public int delete(int id) {
        return jobDao.deleteById(id);
    }

    @Override
    public int update(Job job) {
        return jobDao.updateById(job);
    }
}
